package com.wenfs.demo.controller;

import com.wenfs.demo.entity.SysUser;
import com.wenfs.demo.service.ISysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author wefashe
 */
@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private ISysUser iSysUser;
    @PostMapping("/save")
    public String save(SysUser user) throws Exception{
        iSysUser.save(user);
        return "redirect:/login";
    }

}
